#ifndef __Math__GhostObject__
#define __Math__GhostObject__
#include "cocos2d.h"
#include "ui/CocosGUI.h"
USING_NS_CC;
using namespace ui;

enum EGhostColor
{
	kGhostColor_Red,
	kGhostColor_Blue,
	kGhostColor_Purple,
};

enum EGhostState
{
	kGhostState_Default,
	kGhostState_Stay,
	kGhostState_Yeah,
};

enum EGhostZOrder
{
	kGhostZOrder_Hand,
	kGhostZOrder_Body,
	kGhostZOrder_Eyes,
	kGhostZOrder_Mouth,
};

enum EGhostComponent
{
	kGhostComponent_Body,
	kGhostComponent_Eyes,
	kGhostComponent_Mouth,
	kGhostComponent_LeftHand,
	kGhostComponent_RightHand,
};

class GhostObject : public Node
{
private:
	void initBody();
	void initComponent();

	void runStateDefault();
	void runStateStay();
	void runStateYeah();
protected:
	float m_scale;

	Button* m_body;
	Sprite* m_eyes;
	Sprite* m_mouth;
	Sprite* m_leftHand;
	Sprite* m_rightHand;

	EGhostColor m_color;
	EGhostState m_state;
public:
	GhostObject();

	EGhostState getState();
	void setState(EGhostState state);
	void setComponentVisible(EGhostComponent component, bool visible);

	virtual void initalize(EGhostColor color, Vec2 position, float scale);
};
#endif
